#!c:/perl/bin/perl
# loader - starts Perl scripts without the annoying DOS window
use strict;
use Win32;
use Win32::Process;

sub print_error() {
    return Win32::FormatMessage( Win32::GetLastError() );
}

# Create the process object.

Win32::Process::Create($Win32::Process::Create::ProcessObj,
    'C:/perl/bin/perl.exe',            # Whereabouts of Perl
    'perl tkxexam.pl',                 #
    0,                                  # Don't inherit.
    DETACHED_PROCESS,                   #
    ".") or                             # current dir.
die print_error();
